<template>
    <div class="header">
      <el-button class="back-btn" type="text" @click="handleClick"  icon="el-icon-arrow-left">
        </el-button>
        <div class=".title">{{title}}</div>
    </div>
</template>

<script>
export default {
  methods: {
    handleClick () {
      this.$router.back()
    }
  },
  props: {
    title: {
      type: String,
      default: ''
    },
    to: {
      type: String,
      default: '/'
    }
  }
}
</script>

<style lang="scss" scoped>
@import "../../assets/styles/global";
    .header {
      height: 40px;
      font-size: 14px;
      display: flex;
      align-items: center;
      justify-items: stretch;
      .back-btn {
        color: #000;
        flex:  0 0 40px;
      }

      .title {
        flex: 1;
        text-align: center;
      }

    }
</style>
